<div class="container">
	<form id="settingsform">
		<label id="messegeheader" class="header"><strong>In order to serve you well, we would like you to provide us this information.</strong> </label>
		<label class="settingsformlabel" ><strong>*Email ID:</strong> </label><input type="text" id="emailid"  value="<%= setting.get('user').email %>"/>
		<label class="header error" id="errorMsgemailid"><strong></strong></label>
		<% if(!setting.get('user').userType){ %>
		
			 <label class="settingsformlabel"><strong>*Phone Number:</strong></label> <input type="text" id="phonenumber" value=""/>
			<label class="header error" id="errorMsgphonenumber"><strong></strong></label>
		
		
			<label class="settingsformlabel"><strong>*You are using as:</strong></label>
			<select class="select" id="userType" >
				<option>--Select--</option>
				<option value="P" >Patient</option>
				<option value="D" >Doctor</option>
				<option value="L" >Lab Technician</option>
				<option value="A" >Hospital Staff</option>
				<option value="S" >Management</option>
			</select>
			<label class="header error" id="errorMsgRole"><strong></strong></label>
			<label class="settingsformlabel hpatient pnone" ><strong>PatientID if you have already:</strong> </label>
			<input type="text" id="clientId" class="hpatient pnone"  value=""/>
			<label class="header error hpatient pnone" id="errorMsgclientno"><strong></strong></label>

			<label class="settingsformlabel hdoctor dnone"><strong>*Please provide your speciality:</strong></label>
			<input type="text" id="speciality" class="hdoctor dnone"  value=""/>
			<label class="header error  hdoctor dnone" id="errorMsgSpeciality"><strong></strong></label>
	
			<label class="settingsformlabel  hdoctor dnone" ><strong>*Registration Number:</strong> </label>
			<input type="text" id="registrationNo"  class="hdoctor dnone" value=""/>
			<label class="header error hdoctor dnone" id="errorMsgregistration"><strong></strong></label>
			<label class="settingsformlabel hdoctor dnone" ><strong>Hospitals:</strong> </label>
			<select class="hdoctor dnone" id="hospitals" multiple="multiple">
				<%_.each(allHospitals, function(h){ %>
						<option value="<%= h.get('id')%>" ><%= h.get('hospitalName')%></option>
				<%});%>
			</select>
			<label class="settingsformlabel hlab hnone" ><strong>Lab Name:</strong> </label>
					<select class="hlab dnone" id="labs" >
						<%_.each(allLabs, function(h){ %>
								<option value="<%= h.get('id')%>" ><%= h.get('labName')%></option>
						<%});%>
					</select>
		
			
		<% } else{ %>
			       <label class="settingsformlabel"><strong>*Phone Number:</strong></label> <input type="text" id="phonenumber" value="<%= setting.get('user').phoneNumber%>"/>
				<label class="header error" id="errorMsgphonenumber"><strong></strong></label>
		<%}%>
		<% if(setting.get('user') && setting.get('user').userType == "D"){ %>
	
			<label class="settingsformlabel hdoctor"><strong>*Please provide your speciality:</strong></label>
			<input type="text" id="speciality" class=""  value="<%= setting.get('doctordetails').specialities.speciality %>"/>
			<label class="header error  " id="errorMsgSpeciality"><strong></strong></label>
	
			<label class="settingsformlabel " ><strong>*Registration Number:</strong> </label>
			<input type="text" id="registrationNo"  class="" value="<%= setting.get('doctordetails').registrationNo %>"/>
			<label class="header error " id="errorMsgregistration"><strong></strong></label>
			<label class="settingsformlabel" ><strong>Hospitals:</strong> </label>
			<select class="" id="hospitals" multiple="multiple">
				<%var s=setting.get('hospitals');for(var i in s){%>
						<%var found=false;%>
						<%var ms=setting.get('myhospitals');for(var j in ms){%>
							<% if(s[i].id == ms[j].hospitals.id){%>
							<%found=true;break;%>
							<%};%>	
						<%};%>		
						<option value="<%= s[i].id%>" <% found==true?print("selected"):""%>><%= s[i].hospitalName%></option>
				<%};%>
				

			</select>
			
		<% }else if(setting.get('user') && setting.get('user').userType == "P"){ %>
			<label class="settingsformlabel " ><strong>PatientID if you have already:</strong> </label>
			<input type="text" id="clientId" class="" value="<%= setting.get('user').clientId %>"/>
			<label class="header error " id="errorMsgclientno"><strong></strong></label>
		
		<%} else if(setting.get('user') && setting.get('user').userType == "L"){%>
			<label class="settingsformlabel " ><strong>Lab Name:</strong> </label>
					<select class="docselect" id="labs" >
						<%_.each(allLabs, function(h){ %>
								<option value="<%= h.get('id')%>" ><%= h.get('labName')%></option>
						<%});%>
					</select>
					
		
		<%}%>
		<input type="button" id="submitdetails" value="Submit">
	</form>
	
	   
</div>